import {mapActions, mapGetters} from 'vuex';
//import api from 'api';

export default {
  data () {
    return {
      lang: this.$i18n.locale, // 当前语言
      menuList: [{
        "menuId": "course_1",
        "menuNameCn":"功能",
        "menuNameEn":"功能",
        "iconCls": "el-icon-location",
        "children":[{
          "menuId": "course_2",
          "menuNameCn":"课程列表",
        
          "iconCls": "el-icon-location",
          "children":[],
          "comp":"courseList",
          "url":"/courseList"
        },
        {
          "menuId": "course_3",
          "menuNameCn":"新建课程",
        
          "iconCls": "el-icon-location",
          "children":[],
          "comp":"info_course",
          "url":"/info_course"
        },
     ],
        "comp":"",
        "url":""
      },
      ], // 菜单集合
      showMenuFlag: true, // 是否展示菜单
      isCollapse: false // 是否折叠菜单

    };
  },

  methods: {
    toInfo(item){
      this.$store.state.course.currentCourseId='none'
      this.courseAddTab(item)
    },
    ...mapActions([ // https://vuex.vuejs.org/zh-cn/actions.html
      'courseAddTab',
      'courseRemoveTab',
      'courseClickTab'
    ])
  },
  computed: {
    ...mapGetters([ // https://vuex.vuejs.org/zh-cn/getters.html
      'getCourseCurrentTab',
      'getCourseTabs'
    ])
  },
  components: {
    info_course: () => import('views/Course/publish_course/info.vue'),
    courseList: () => import('views/Course/publish_course/list.vue'),
    chapter_course:()=>import('views/Course/publish_course/chapter.vue'),
    publishCourse:()=>import('views/Course/publish_course/publish.vue'),
    paperList: () => import('views/Course/publish_course/paper.vue'),
  
 
  }
};
